﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) Michael Herndon.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.Twitter
{
	using System.ServiceModel;
	using System.ServiceModel.Web;

	/// <summary>
	/// Contract for twitter Favorite methods. 
	/// </summary>
	[ServiceContract]
	public interface IFavoriteClient
	{

		/// <summary>
		/// Gets an array of the favorites of the current user.
		/// </summary>
		/// <returns>returns an array of <see cref="Amplify.Twitter.Status"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs.</exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/favorites/{id}.json?page={page}")]
		Status[] GetList(string id, int page);


		/// <summary>
		/// Creates a favorite for the specified <see cref="Amplify.Twitter.Status"/> (tweet).
		/// </summary>
		/// <param name="id">The id of the status.</param>
		/// <returns>returns a <see cref="Amplify.Twitter.Status"/> object. </returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/favorites/create/{id}.json")]
		Status Create(string id);

		/// <summary>
		/// Destroys a favorite for the specified <see cref="Amplify.Twitter.Status"/> (tweet).
		/// </summary>
		/// <param name="id">The id of the status.</param>
		/// <returns>returns a <see cref="Amplify.Twitter.Status"/> object.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/favorites/destroy/{id}.json")]
		Status Destroy(string id);


	}
}
